<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Title</title>
</head>
<body>

    <p id="demo"></p>
    <button onclick="randomArrangement()">随机排序</button>
    <script type="text/javascript">
        var points = ["张三","李四","王五"];
        // console.log("原始数据"+points);

        document.getElementById("demo").innerHTML=points;

        function randomArrangement(){
            points.sort(function (){return 0.5-Math.random()});
            document.getElementById("demo").innerHTML=points;
        }

    </script>



</body>
</html>
